import React from "react";
import "./index.less";
import logo from "../../statics/images/logo.png";
import {useTranslation} from "react-i18next";

export default function Nav(props) {
    const {t, i18n} = useTranslation();
    return (
        <div className="nav" >
            <div className="nav__tertiary flexRow">
                <div className="flex"></div>
                <div className="tell">call +86 18303951089</div>
            </div>
            <div className="nav__main flexRow alignItemsCenter">
                <img className="logo" src={'http://47.115.148.248:9000/officeweb/office_logo.png'}/>
                <ul className="nav__primary">
                    {[
                        {key: "home", content: "Construction"},
                        {key: "products", content: "Products"},
                        // { key: "agriculture", content: "Agriculture" },
                        // { key: "wasteRecycle", content: "Waste and Recycling" },
                        {key: "about", content: "About Us"},
                    ].map((item) => {
                        return (
                            <li key={item.key}>
                                <a href={`/${item.key}`}>{item.content}</a>
                            </li>
                        );
                    })}
                </ul>
                <div className="flex">
                    {/*{t("title")}*/}

                    <div
                        style={{marginLeft: 50}}
                        onClick={() => {
                            window.lang = window.lang === "cn" || !window.lang ? "en" : "cn";
                            window.location.reload();
                        }}
                    >
                        {/*test*/}
                    </div>
                </div>
            </div>
        </div>
    );
}
